Contents
LED Display Custom Control

The following Help Topics are available:

Properties	Events	Error Messages

Copyright Notice

Order Form	Registration

Description

The LED Display control is a custom control for Microsoft Visual Basic which allows you to display numbers in a visually appealing and familiar manner, similar to the display of numbers in an LED display which might be found on your VCR, microwave oven or other device.  This is what the LED Display control looks like as an icon in the Toolbox:

This help file will provide interactive, context-sensitive help for the control if it is placed in your system`s WINDOWS directory or in the directory in which your Visual Basic project resides (your current working directory).

When you press F1 in VB`s design mode, the help topic associated with the currently selected property or control will be presented.

File Name

LEDDISP.VBX

Object Type

Numeric LED Display

List of Properties

List of Events

How To.

Distribution Note   When you create and distribute applications that use the LED Display control, you should install the file LEDDISP.VBX in the customer`s Microsoft Windows \SYSTEM subdirectory.


Registration Information

This custom control is distributed as shareware, and is a fully functioning version of the control.  No features are disabled.  The Shareware version of this control displays a dialog box which identifies the control as shareware.  This dialog box is displayed once when the control is first loaded.  When you purchase a license for this control, you receive the following:

*	A version of the control software which contains no shareware notice.

*	An, unlimited, non-exclusive license to distribute the control for runtime use as part of your application.

If you would like to register your copy, please use the Order Form which accompanies this Help File.  By registering this custom control, you`ll receive update notices from time to time as they become available as well as information about other Syncom products.

Syncom, Inc.

P.O. Box 1592

Morristown, New Jersey  07960-1592

Orders:	1-800-457-7884

Fax:	1-201-267-6605


Ordering Information

Use the Print Topic command from the File menu to print the order form.

Click here to display Order Form

Ordering by check:   To order by check send this order form and a check to Syncom, Inc., P.O. Box 1592, Morristown, New Jersey  07960-1592.  Payments made by check or money order must be in US dollars drawn on a US bank.  Alternatively, you can send payment via an international postal money order denominated in US dollars.

Facsimile Orders may be transmitted to 1-201-267-6605.  Payment by credit card will assure same-day shipment of orders received by facsimile.

Telephone Orders   Credit card orders only may be placed by telephone.  In the U.S. and Canada, call toll-free at 1-800-457-7884.

Mail or Fax this form to:

Syncom, Inc.

P.O. Box 1592

Morristown, New Jersey  07960-1592

Telephone Orders:	1-800-457-7884

Fax:	1-201-267-6605


Order Form

Use the Print Topic command from the File menu to print the order form.

Click here for Ordering Information.

Order and Invoice

Syncom, Inc.

P.O. Box 1592

Morristown, New Jersey  07960-1592

Ship to:

Name:  	_______________________________________________________

Company  	_______________________________________________________

Department  	_______________________________________________________

Address:      	_______________________________________________________

City, State Zip	_______________________________________________________

Phone:	_____________________________

Please Enter the following order:

Quantity  Ordered	Description	Price Ea.	Ext
_______	LED Display Custom Control for Visual Basic	$19.00 *	$___________
	New Jersey & New York residents  add applicable sales tax.		$___________
	Shipping & Handling		$3.00
		Total:	$__________

*  Add $5.00 for international orders.

Please make checks and money orders Payable to: Syncom, Inc.

Credit Card Information:

/__/ AmEx	/__/ Visa	/__/ MasterCard

Credit Card Number:	_________________________________________

Exp. Date:	______ / _____

Signature:	_________________________________________


TextColor Property

Description

The TextColor property is used to set the color used to draw digits in the LED display.  This property is available at design time and at runtime.

Usage

[form.] LEDDisplay. TextColor = Color&

Default Value

Cyan - RGB(0, 255, 255);

Remarks

Visual Basic uses the Microsoft Windows environment RGB scheme for colors. Text color for digits displayed within the LED Display control can be set by setting the TextColor Property using colors specified by using the Visual Basic Color palette, or by using the RGB or QBColor functions at runtime.

The color of unlit segments in the LED display is not user-definable.  Instead, it is set automatically to half of the RGB value of the selected text color

Data Type

Long


Action Property

Description

The Action property is used to initiate actions within the LED Display control.  This property is not available at design time, and is write-only at runtime.

Usage

[form.] LEDDisplay. Action  = Setting%

Default Value

None

Remarks

This property is used to select an action for the LED Display control. The following list contains the possible actions which can be initiated by setting the value of the Action property at runtime..

ID	Setting	Description

CLEAR	1	Clears the LED display.  The invisible cursor is reset according to the value of the TextEntry property.
AUTOSIZE	2	Autosizes the control`s window to wrap snugly around the digits.
Data Type

Integer


Number Property

Description

The Number property is used to set the contents of the LED display.  The Number property is available at runtime only.

Usage

[form.] LEDDisplay. Number = Setting&

Default Value

None.

Remarks

Use the Number property to illuminate numbers on the LED display.  This property has two modes of operation, depending on the value to which the property is set.

In order to scroll a single number onto an existing display of numbers, merely set the Mode Property to Scroll.  The value to which the Number property was set will appear as the trailing digits on the display, causing a scroll to the left of any digits which had been present.  You can use this technique to smoothly scroll digits across the display.

If the value of the Mode Property is set to Non-Scroll, the display operation functions differently.  When values are set to the LED Display control using the Number Property, the display is first cleared, then the entire number is displayed on the LED Display, left or right justified, depending on the value of the TextEntry Property.

If the numeric setting contains more digits than can be displayed on the LED display, the most-significant digits scroll off the left side of the display first.

Use the Text Property to display negative numbers on the LED display.   Also, you must use the Text Property to read the contents of the display at runtime.

Data Type

Long


Text Property

Description

The Text property is used to set the contents of the LED display.  This property is available both at design time and at runtime.  When it is read at runtime, the value returned is the character string which represents the entirety of the display, even though the most recently written text may have been different than the current display contents.

Usage

[form.] LEDDisplay. Text = Setting$

Default Value

None.

Remarks

Use the Text property to illuminate digits on the LED display control.  Setting the Text property causes the display to be re-painted immediately with the value of the text setting you supplied.  This property is provided to help you avoid having to convert between numeric and string values, and to provide a means to set display digits to non-numeric values.

The following alphabetic (non-numeric) characters are currently supported in the LED display:

Character	ASCII Value	Description
+	43	Plus
-	45	Minus
.	46	Dot
:	58	Colon

Setting the Text property overwrites any previously displayed data.  To add characters to an existing display (the Mode Property must be set to 1 to enable Scroll), first set the DigitIndex property to the location where you want the character(s) displayed.

Data Type

String


DigitHeight Property

Description

The DigitHeight property is used to set the size of the LED display characters.  This property is available both at design time and at runtime.  The property can be read at runtime, and will return the current height of the display area of the control.

Usage

[form.] LEDDisplay. DigitHeight = Setting%

Default Value

None.

Remarks

Use the DigitHeight property to set the height of the characters in the LED Display.

Data Type

Integer


Digits Property

Description

The Digits property is used to set the number of characters displayed in the LED Display.  This property is available both at design time and at runtime. The LED Display control is capable of displaying up to 31 digits.

Usage

[form.] LEDDisplay. Digits = Setting%

Default Value

None.

Remarks

The maximum value to which the Digits property can be set is 31.

Setting the Digits property at runtime will clear the LED Display control of any characters which are currently being displayed.

It is possible to set the Digits property to a setting which contains more digits than the display window can accommodate.  In this case, merely drag the window until all the digits are visible.  The digits will always remain centered within the display window.

Double-clicking with the RIGHT mouse button, on the LED Display control`s display window at design-time will automatically resize the display window to a size which will accommodate all the digits.

Data Type

Integer


UnlitSegments

Description

The value of the UnlitSegments property determines whether or not unlit segments in the LED Display control will be displayed.  This property is available both at design time and at runtime.

Usage

[form.] LEDDisplay. UnlitSegments = Setting%

Default Value

On

Remarks

The On value is 1, and the Off value is 0.

Data Type

Integer - enumerated


TextEntry Property

Description

The TextEntry property sets the initial position of the control`s invisible cursor.  This property affects the justification of the displayed digits, and determines whether characters entered into the display will be inserted from the right or left side.  This property is available both at design time and at runtime.

Usage

[form.] LEDDisplay. TextEntry = Setting%

Default Value

Right

Remarks

The Left value is 0, and the Right value is 1.

Data Type

Integer - enumerated


DigitIndex Property

Description

The DigitIndex property functions as a cursor for character insertion.  It sets the character position at which digits inserted with the Number property or the Text Property will be inserted into the array of digits.  The DigitIndex property is not available at design-time.

Usage

[form.] LEDDisplay. DigitIndex = Setting%

Default Value

None

Remarks

Use this property to insert single digits at any selected location within the LED Display array.  The Mode Property must be set to 1 (Scroll) in order to insert a character at the position specified by the DigitIndex property.

Data Type

Integer


LeadingZeros Property

Description

The LeadingZeros property sets the field width for entries to the LED Display which are made using the Number Property.  This property can be used to ensure that the number entered in the LED Display will occupy a certain number of characters, irrespective of the value displayed.  This property is available both at design time and at runtime.

Usage

[form.] LEDDisplay. LeadingZeros = Setting%

Default Value

0

Remarks

If you enter a 0 into the LED Display control, it will not be visible unless this property is set to at least 1.  This property has no effect for text entered with the Text Property.

Data Type

Integer


Mode Property

Description

The Mode property sets the LED Display control`s scrolling behavior.  This property is available both at design time and at runtime.

When set to Non-Scroll (0), the LED Display control displays each value by first clearing the current contents of the display.

If you wish to scroll numbers across the display, set the value of this property to Scroll(1).  In this manner, the value of digits set to the display are appended to the current display contents at the cursor position established by the DigitIndex Property, producing an interesting effect.

Usage

[form.] LEDDisplay. Mode = Setting%

Default Value

0 - Non-Scroll

Remarks

The Non-Scroll value is 0, and the Scroll value is 1.

Note that this property is incompatible with the LeadingZeros Property.  Setting this value to Scroll at runtime will generate a Visual Basic error number 26401.

Data Type

Integer


Properties

All of the properties for this control are listed in the table below.  Properties that apply only to this control are marked with an Asterisk.  For documentation on the remaining properties, the reader is referred to Appendix A, Standard Properties, Events and Methods, in the Microsoft Custom Control Reference.

* Action	* CharHeight	* DigitIndex	Enabled
Height	HelpContextID	Hwnd	Index
* LeadingZeros	Left	* Mode	MousePointer
Name	* Number	* Digits	Parent
Tag	* Text	* TextColor	* TextEntry
Top	* UnlitSegments	Visible	Width


Events

All of the events for this control are listed in the table below.  Events that apply only to this control are marked with an Asterisk.  For documentation on the remaining events, the reader is referred to Appendix A, Standard Properties, Events and Methods, in the Microsoft Custom Control Reference.

Click	DoubleClick
DragDrop	DragOver
MouseDown	MouseMove
MouseUp


Error Messages

The following table lists the trappable run-time errors for the LED Display control.

Error Message	Number	Description
LEDERR_MODE	26401	This error is caused by setting the Mode Property to Scroll when leading zeroes are set to a value other than 0.
LEDERR_ZEROS	26402	This error is caused by setting the LeadingZeros property to a value other than 0 when the Mode Property is set for Scrolling.


How To

Here`s how to perform specific tasks within the control.

Automatically resize the control`s window.

Set left or right justification of characters which are displayed.

Display a sign, decimal point or colon.

Read the contents of the LED Display using the Text Property.


Automatically Resizing the Control Window

You can easily resize the window of the LED Display control at design-time so that it snugly accommodates all the digits in your display.  With the control selected, just double-click the right mouse button.  This will resize the window so that all the digits in the display fit within it.

You may resize the display window at runtime by setting the Action Property.  Refer to the Action Property topic for the specific value associated with this task.


Displaying a Dash Character

Although the LED display control does not display negative numbers, you can display a dash character on the display to simulate the display of a negative number.

Just convert the negative number you wish to display into text, then display the text that youve created using the Text Property.

Alternatively, you can position the display`s cursor using the DigitIndex property, and display a dash character by setting the Text property to the string -.  Make sure that the Mode property is set to Non-Scroll if you use this method.


Copyright Notice

This LED Display Control Copyright © 1994 by Syncom, Inc. - All rights reserved.

License Agreement

IMPORTANT--READ THE FOLLOWING LICENSE AGREEMENT CAREFULLY BEFORE INSTALLING AND/OR USING THE SOFTWARE.  By installing and/or using the software, you indicate your acceptance of the following License Agreement ("Agreement").  If you do not agree to the terms of this Agreement, promptly delete the software from your computer and discontinue use of the software.

You may:

Incorporate LEDDISP.VBX in your development environment.

Freely distribute the LEDDISP.VBX dynamic link library file as a RUNTIME component of your applications.

You may NOT:

modify any component of the software in any way;

reverse engineer, decompile, or disassemble the SOFTWARE except to the extent the foregoing restriction is expressly prohibited by local law;

remove any proprietary notices, labels, or marks on the program and accompanying documentation (help file);

sell or resell LEDDISP.VBX and/or any of its accompanying components and documentation, by itself or as part of another package, except as a RUNTIME component of another application whose primary purpose is NOT illustration of the functionality of LEDDISP.VBX.

Limitation of liability:

NO WARRANTIES.  TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, SYNCOM, INC DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  SYNCOM SHALL NOT BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING DIRECT, INDIRECT, LOST PROFITS OR INFORMATION, BUSINESS INTERRUPTION, OR OTHER PECUNIARY LOSS, EVEN IF SYNCOM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.  BECAUSE SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, THE ABOVE LIMITATION MAY NOT APPLY TO YOU.

The SOFTWARE and documentation are provided with RESTRICTED RIGHTS.  Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 or subparagraphs (c)(1) and (2) of the Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19, as applicable.

Manufacturer is Syncom, Inc./PO Box 1592/Morristown, NJ  07960

This Agreement is governed by the laws of the State of New Jersey.

Registration:

If you would like to register your LED Display custom control, please refer to the registration section in this help file.  Registration grants you a license to distribute the registered version of the control with your application.  The registered version does not display the initial registration dialog box.  Additionally, registration will entitle you to notices of updates to this product as well as 90 days free product support (via facsimile).

Syncom, Inc.

P.O. Box 1592

Morristown, New Jersey  07960-1592

Orders:	1-800-457-7884

Fax:	1-201-267-6605